package com.ruoyi.mall.pms.service.impl;

import com.ruoyi.mall.pms.domain.PmsProductFullReduction;
import com.ruoyi.mall.pms.mapper.PmsProductFullReductionMapper;
import com.ruoyi.mall.pms.service.IPmsProductFullReductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商品满减Service业务层处理
 *
 * @author xuxing
 * @date 2021-02-04
 */
@Service
public class PmsProductFullReductionServiceImpl implements IPmsProductFullReductionService
{
    @Autowired
    private PmsProductFullReductionMapper pmsProductFullReductionMapper;

    /**
     * 查询商品满减
     *
     * @param id 商品满减ID
     * @return 商品满减
     */
    @Override
    public PmsProductFullReduction selectPmsProductFullReductionById(Long id)
    {
        return pmsProductFullReductionMapper.selectPmsProductFullReductionById(id);
    }

    /**
     * 查询商品满减列表
     *
     * @param pmsProductFullReduction 商品满减
     * @return 商品满减
     */
    @Override
    public List<PmsProductFullReduction> selectPmsProductFullReductionList(PmsProductFullReduction pmsProductFullReduction)
    {
        return pmsProductFullReductionMapper.selectPmsProductFullReductionList(pmsProductFullReduction);
    }

    /**
     * 新增商品满减
     *
     * @param pmsProductFullReduction 商品满减
     * @return 结果
     */
    @Override
    public int insertPmsProductFullReduction(PmsProductFullReduction pmsProductFullReduction)
    {
        return pmsProductFullReductionMapper.insertPmsProductFullReduction(pmsProductFullReduction);
    }

    /**
     * 修改商品满减
     *
     * @param pmsProductFullReduction 商品满减
     * @return 结果
     */
    @Override
    public int updatePmsProductFullReduction(PmsProductFullReduction pmsProductFullReduction)
    {
        return pmsProductFullReductionMapper.updatePmsProductFullReduction(pmsProductFullReduction);
    }

    /**
     * 批量删除商品满减
     *
     * @param ids 需要删除的商品满减ID
     * @return 结果
     */
    @Override
    public int deletePmsProductFullReductionByIds(Long[] ids)
    {
        return pmsProductFullReductionMapper.deletePmsProductFullReductionByIds(ids);
    }

    /**
     * 删除商品满减信息
     *
     * @param id 商品满减ID
     * @return 结果
     */
    @Override
    public int deletePmsProductFullReductionById(Long id)
    {
        return pmsProductFullReductionMapper.deletePmsProductFullReductionById(id);
    }
}
